<h2>Problem 230</h2>
<div style="color:#666;font-size:80%;">31 January 2009</div><br />
<div class="problem_content">
<p>For any two strings of digits, A and B, we define F<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" /> to be the sequence (A,B,AB,BAB,ABBAB,...) in which each term is the concatenation of the previous two.</p>

<p>Further, we define D<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" />(<var>n</var>) to be the <var>n</var><img src="" style="display:none;" alt="^(" /><sup>th</sup><img src="" style="display:none;" alt=")" /> digit in the first term of F<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" /> that contains at least <var>n</var> digits.</p>

<p>Example:</p>

<p>Let A=1415926535, B=8979323846. We wish to find D<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" />(35), say.</p>

<p>The first few terms of F<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" /> are:<br />
1415926535<br />
8979323846<br />
14159265358979323846<br />
897932384614159265358979323846<br />
1415926535897932384689793238461415<span style="color: #FF0000"><b>9</b></span>265358979323846<br />
</p>

<p>Then D<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" />(35) is the 35<img src="" style="display:none;" alt="^(" /><sup>th</sup><img src="" style="display:none;" alt=")" /> digit in the fifth term, which is 9.</p>

<p>Now we use for A the first 100 digits of &pi; behind the decimal point:</p>
<p>14159265358979323846264338327950288419716939937510 <br />
58209749445923078164062862089986280348253421170679 </p>

<p>and for B the next hundred digits:</p>

<p>82148086513282306647093844609550582231725359408128 <br />
48111745028410270193852110555964462294895493038196 .</p>

<p>Find <img src='images/symbol_sum.gif' width='11' height='14' alt='&sum;' border='0' style='vertical-align:middle;' /><img src="" style="display:none;" alt="_(" /><sub><var>n</var> = 0,1,...,17</sub><img src="" style="display:none;" alt=")" /> &nbsp; 10<img src="" style="display:none;" alt="^(" /><sup><var>n</var></sup><img src="" style="display:none;" alt=")" /><img src='images/symbol_times.gif' width='9' height='9' alt='&times;' border='0' style='vertical-align:middle;' /> D<img src="" style="display:none;" alt="_(" /><sub>A,B</sub><img src="" style="display:none;" alt=")" />((127+19<var>n</var>)<img src='images/symbol_times.gif' width='9' height='9' alt='&times;' border='0' style='vertical-align:middle;' />7<img src="" style="display:none;" alt="^(" /><sup><var>n</var></sup><img src="" style="display:none;" alt=")" />) .</p>



 

</div><br />
